package com.xyy.saas.payment.cores.enums;

import lombok.Getter;

/**
 * @author liujf
 */
@Getter
public enum XydPaidOffEnum {
    PAID_OFF(1, "结清"),
    UN_PAID_OFF(0, "未结清"),
    ;
    private Integer code;

    private String name;

    XydPaidOffEnum(Integer code, String name) {
        this.code = code;
        this.name = name;
    }

    public static String getNameByCode(Integer code) {
        if (PAID_OFF.code.equals(code)) {
            return PAID_OFF.name;
        } else if (UN_PAID_OFF.code.equals(code)) {
            return UN_PAID_OFF.name;
        } else {
            return null;
        }
    }

}
